package com.example.myproject.client;

import com.example.myproject.shared.FieldVerifier;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.StackLayoutPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class MercurialTwo implements EntryPoint {
    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {
        StackLayoutPanel p = new StackLayoutPanel(Unit.EM);
        p.add(new HTML("this"), new HTML("[this]"), 4);
        p.add(new HTML("that"), new HTML("[that]"), 4);
        p.add(new HTML("MERCURIAL TWO"), new HTML("[MERCURIAL TWO]"), 4);
        
        // Grids must be sized explicitly, though they can be resized later.
        Grid g = new Grid(10, 10);
        // Put some values in the grid cells.
        for (int row = 0; row < 10; ++row) {
            for (int col = 0; col < 10; ++col) {
                g.setWidget(row, col, new Image("images/Sanitation.jpg"));
            }
        }
        ScrollPanel sp = new ScrollPanel();
        sp.add(g);
        p.add(sp, new HTML("Mars Habitat Configuration"), 4);

        // Attach the LayoutPanel to the RootLayoutPanel. The latter will listen for
        // resize events on the window to ensure that its children are informed of
        // possible size changes.
        RootLayoutPanel rp = RootLayoutPanel.get();
        rp.add(p);
    }
}
